/*
 * Copyright 2008 Daniel Freitas
 *
 * This file is part of Army Creator.
 * 
 * Army Creator is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Army Creator is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Army Creator.  If not, see <http://www.gnu.org/licenses/>.
 */
package cheesr.application.examples;

import java.net.MalformedURLException;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.ExternalLink;
import org.apache.wicket.model.PropertyModel;

import cheesr.model.Recipe;

public class Links extends WebPage {

    private Recipe recipe;

    public Links() {
        try {
            recipe = new Recipe("Salsa Shrimp Melts",
                    "http://www.dairygoodness.ca/en/consumers/food/recipes/all/2000/2052.htm?recipeid=2052");
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }

        add(new Label("message", "Hello, World!"));
        add(new ExternalLink("link", new PropertyModel(recipe, "url"), new PropertyModel(recipe, "name")));
    }
}